# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgbase=rime-prelude
pkgname=(rime-prelude librime-data)
pkgver=0.0.0.20220409
_commit=dd84abecc33f0b05469f1d744e32d2b60b3529e3
pkgrel=1
pkgdesc="Essential files for building up your Rime configuration"
arch=('any')
url="https://github.com/rime/rime-prelude"
license=('LGPL')
source=("https://github.com/rime/rime-prelude/archive/$_commit/rime-prelude-$_commit.tar.gz")
sha512sums=('684d78bf66456d7ee31ecbc57e6c5e768e77c04b27f8282af11a6b5ffdb1f60480161f5305a321b31ff17ba4094b23ee742850dace986b521601d2b1081afda7')

package_rime-prelude() {
  pkgdesc="Essential files for building up your Rime configuration"

  cd $pkgname-$_commit
  install -Dm644 *.yaml -t "$pkgdir"/usr/share/rime-data/
}

package_librime-data() {
  pkgdesc="Meta package of preset librime data"
  depends=('rime-prelude' 'rime-essay' 'rime-luna-pinyin' 'rime-bopomofo' 'rime-cangjie' 'rime-stroke' 'rime-terra-pinyin')
  replaces=('brise')
  conflicts=('brise')
}
